#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<string>
using namespace std;
int main()
{
	/*string s1("hello world");
	cout << s1.size() << endl;
	cout << s1.capacity() << endl;
	s1.resize(9);
	cout << s1 << endl;
	cout << s1.size() << endl;
	cout << s1.capacity() << endl;*/
	string s1 = "hello";
	cout << s1.size() << endl;
	cout << s1.capacity() << endl;
	s1.reserve(50);
	cout << s1.capacity() << endl;
	s1.resize(20);
	cout << s1.size() << endl;
	cout << s1.capacity() << endl;
	s1.append("xxxxx");
	cout << s1 << endl;
	string s2("111");
	s2.append(s1, 0, 2);
	cout << s2<<endl;
	s2 += s1;
	cout << s2;
	return 0;
}